package com.world.lzh.controller;

import com.world.lzh.entity.User;
import com.world.lzh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author lzh
 * @Date 2022/5/12 - 9:13
 * @Description
 * @Version 1.0.0
 **/
@RestController
@RequestMapping("/user")
public class IndexController {
    @Autowired
    private UserService userService;

    @PostMapping("/save")
    public String save(@RequestBody User user) {
        return userService.save(user);
    }

    @PostMapping("/select")
    public Object select(@RequestBody User user) {
        return userService.select(user);
    }

}
